#ifndef RECEIVE_PROCESSOR_H
#define RECEIVE_PROCESSOR_H

#include <QObject>
#include <QDateTime>
class Receive_Processor : public QObject
{
    Q_OBJECT
public:
    explicit Receive_Processor( QList<QList<int> *>*Register_location,
                                QList<QString> *Code_type,
                                QList<double> *Coefficient_list,
                                QList<QString> *Unit_list,
                                QList<QString> *Annotation_list,
                                QList<QString> *Db_type_list,
                                QList<QString> *Param_db_name,
                                QList<double> *Param_top_value,
                                QString Address,
                                QObject *parent = nullptr);

    void Process_data();
    int hexQCharToInt(const QChar &c);
    ///各参数所包含的字节的位置
    QList<QList<int> *>*register_location;
    ///编码方式
    QList<QString> *code_type;
    ///参数的系数
    QList<double> *coefficient_list;
    ///参数的单位
    QList<QString> *unit_list;
    ///变量名（参数注解）
    QList<QString> *annotation_list;
    ///该参数数据库在数据库中的变量类型
    QList<QString> *db_type_list;
    ///当前的输入数据
    QString received_data;
    ///地址
    QString address;
    ///最新数据时间
    QDateTime last_update;
    ///当前计算出的真实值
    QList<double> *real_value_list;
    ///在数据中的表的名称
    QList<QString> *param_db_name;
    ///各能耗参数的阈值
    QList<double> *top_value_list;
signals:
};

#endif // RECEIVE_PROCESSOR_H
